<?php
error_reporting(0);
session_start();
include_once '../comm/config.php';
include '../comm/checkpostandget.php';
include 'check.php';
include_once '../comm/wjt.php';

$page = !($_GET['page'])?'1':intval($_GET['page']);
$pagesize=10;
$page2=($page-1)*$pagesize;

$hlink = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$hlink) {
	die(ERR_DB);
}
else
{
	mysql_query("set names utf8");
	$sql="select * from ".$BIAOTOU."tixian where ddusername='".$_SESSION["duoduouser"]."'";
	mysql_select_db($dbname);
	$rs = mysql_query($sql);
	$total = mysql_num_rows($rs);	
	
	$sql="select * from ".$BIAOTOU."tixian where ddusername='".$_SESSION["duoduouser"]."' order by id desc limit $page2,$pagesize";
	$rs = mysql_query($sql);
}
mysql_close($hlink);
$tag="center";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>提现记录 - 用户中心</title>
<link href="../css/usercss.css" rel="stylesheet" type="text/css">
<link href="../template/<?=MOBAN?>/css/common.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/jquery.js"></script>
</head>

<body id="tixianlist">
<?php
include("../template/".MOBAN."/header.tpl.php");
?>
<?php
include("../template/".MOBAN."/nav.tpl.php");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="289" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="51"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="50" colspan="2"><?php
include("left.php");
?></td>
          </tr>
          <tr>
            <td width="493" height="25"><img src="../images/in_top_ico.gif" alt="账户明细" align="absmiddle" /><strong> 提现记录：</strong></td>
            <td width="491" align="right"><?php echo ($page-1)*$pagesize+1?> - <?php echo($page)*$pagesize?> 条&nbsp;&nbsp;&nbsp;&nbsp;共有 <?php echo $total;?> 条明细记录</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="180" valign="top"><table width="980" border=1 align="center" cellpadding=0 cellspacing=0 bordercolor="#dddddd"
style="border-collapse: collapse">
                    <tr>                      
                      <td width="21%" bgcolor="#F2F2F2" class="bigtext"><strong>&nbsp;&nbsp;提现支付宝</strong></td>
					  <td width="14%"  height="30" bgcolor="#F2F2F2" class="bigtext"><strong>&nbsp;&nbsp;提现金额</strong></td>
                      <td width="16%" bgcolor="#F2F2F2" class="bigtext"><strong>&nbsp;&nbsp;提现人</strong></td>
                      <td width="16%" bgcolor="#F2F2F2" class="bigtext"><strong>&nbsp;&nbsp;提现状态</strong></td>
                      <td width="17%" bgcolor="#F2F2F2" class="bigtext"><strong>&nbsp;&nbsp;提现IP</strong></td>
                      <td width="16%" bgcolor="#F2F2F2" class="bigtext"><strong>&nbsp;&nbsp;提现时间</strong></td>
                    </tr>
                    <?php
					while ($row = mysql_fetch_array($rs))
					{
						$zt="";
						if($row["txstate"]=="0")
						{$zt= "<font color=#ff3300>等待审核</font>";}
						else if($row["txstate"]=="1")
						{$zt= "<font color=#009900>提现成功</font>";}
						else{
						$zt= "<font color=#333333>提现失败</font>";
						}
						echo "<tr>";						
                      	echo "<td>&nbsp;&nbsp;".$row["zfb"]."</td>";
						echo "<td height=30>&nbsp;&nbsp;".$row["txje"]." 元</td>";
						echo "<td>&nbsp;&nbsp;".$row["memo"]."</td>";
						echo "<td>&nbsp;&nbsp;".$zt."</td>";
						echo "<td>&nbsp;&nbsp;".$row["addip"]."</td>";
						echo "<td>&nbsp;&nbsp;".$row["addtime"]."</td>";
						echo "</tr>";
					}
					?>
                    <tr>
                      <td height="43" colspan="8" align="center"><div id="pages">
                          <?php  
require_once("../comm/pages.php"); $page_size=10;    
  $totals=$total;     
  $sub_pages=10;   
  $pageCurrent=$_GET["page"]; $subPages=new SubPages($page_size,$totals,$pageCurrent,$sub_pages,"tixianlist.php?page=",2);
?>
                      </div></td>
                    </tr>
          </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<?php
include("../template/".MOBAN."/footer.tpl.php");
?>
</body>
</html>